<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core">

<ui:composition xmlns="http://www.w3.org/1999/xhtml">


<f:subview id="imageProcessingBodyView">

<f:loadBundle basename="kuzmenkov.oip.i18n.front.imageProcessingRes" var="imageProcessingBundle"/>

<div class="pageTitle">
    <h:outputText value="#{imageProcessingBundle.pageTitle}"/>
</div>
<h:panelGroup rendered="#{imagingController.isError}">
    <div class="pageError">
        <h:outputText value="#{imagingController.error}"/>
    </div>
</h:panelGroup>

<h:panelGroup rendered="#{!moduleChoosingController.selectedModule}"
              styleClass="pageMessage">
    <h:form>
        <h:outputText value="#{imageProcessingBundle.selectModule1} "/>
        <h:commandLink value=" #{imageProcessingBundle.selectModule2}" action="home"/>
    </h:form>
</h:panelGroup>
<h:panelGroup rendered="#{moduleChoosingController.selectedModule}">

    <div class="mainPanel">
        <div class="mainPanelTitle">
            <h:outputText value="#{imagingController.moduleName}"/>
        </div>
        <div class="mainPanelSubtitle">
            <h:outputText value="#{imagingController.moduleProducerName}"/>
        </div>

        <div class="mainPanelContent">
            <!--Applet for IE and Mozilla-->
            <div class="imagingApplet">
                <object
                        classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
                        width="#{imagingController.appletWidth}"
                        height="#{imagingController.appletHeight}"
                        type="application/x-java-applet;version=1.4">
                    <param name="type" value="application/x-java-applet;version=1.4"/>
                    <param name="code" value="kuzmenkov.oip.controller.applet.ImageProcessingApplet.class"/>
                    <param name="codebase" value="../ipapplet"/>
                    <param name="archive"
                           value="iapplet.jar,lib/spring-2.5.4.jar,lib/commons-logging-1.1.1.jar,lib/jai_core.jar,lib/jai_codec.jar"/>
                    <comment>
                        <embed width="#{imagingController.appletWidth}"
                               height="#{imagingController.appletHeight}"
                               type="application/x-java-applet;version=1.4"
                               code="kuzmenkov.oip.controller.applet.ImageProcessingApplet.class"
                               codebase="../ipapplet"
                               archive="iapplet.jar,lib/spring-2.5.4.jar,lib/commons-logging-1.1.1.jar,lib/jai_core.jar,lib/jai_codec.jar"
                                >
                            <NOEMBED>
                                No Java 2 SDK, Standard Edition v 1.4 support for APPLET!!
                            </NOEMBED>

                        </embed>
                    </comment>
                </object>
            </div>

            <div class="mainPanelPara">
                <h:outputLink
                        value="#{imagingController.adapterReference}" styleClass="mainPanelLink"
                        target="_blank">
                    <h:outputText value="#{imageProcessingBundle.sourceCodeRef}"/>
                </h:outputLink>
            </div>

            <div class="mainPanelPara">
                <h:outputText value="#{imageProcessingBundle.instruction}"/>
            </div>
            <div class="mainPanelPara">
                <h:outputText value="#{imageProcessingBundle.descOfParams}"/>
            </div>
            <ui:repeat value="#{imagingController.parameters}" var="parameter">
                <div class="parameter">
                    <div class="parameterName">
                        <h:outputText value="#{parameter.name}"/>
                                <span class="parameterResultType">
                                    <h:outputText value="[#{imageProcessingBundle.inputType}]"
                                                  rendered="#{parameter.isResult==false}"/>
                                    <h:outputText value="[#{imageProcessingBundle.outputType}]"
                                                  rendered="#{parameter.isResult}"/>
                                </span>
                                <span class="parameterDefaultValue">
                                    <h:outputText value=" = #{parameter.defaultValue}"
                                                  rendered="#{parameter.defaultValue!=null}"/>
                                </span>

                    </div>
                    <div class="parameterDescription">
                        <h:outputText value="#{parameter.description}"/>
                    </div>
                </div>
            </ui:repeat>
        </div>


        <h:form>
            <div class="mainPanelInfo">

                <h:commandLink class="mainPanelLink"
                               value="#{imageProcessingBundle.contactPage}"
                               action="contacts"/>
                <f:verbatim><br/></f:verbatim>
                <h:commandLink class="mainPanelLink"
                               value="#{imageProcessingBundle.commentPage}"
                               action="comments"/>

            </div>
        </h:form>
    </div>
</h:panelGroup>
</f:subview>
</ui:composition>

</jsp:root>